<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:cc="http://java.sun.com/jsf/composite">
<head><title>collapsiblePanel</title></head><body>
<cc:interface>
  <cc:attribute name="model" required="true">
    <cc:attribute name="collapsed" required="true"/>
    <cc:attribute name="toggle" required="true"
        method-signature="java.lang.String f()"/>
  </cc:attribute>
  <cc:actionSource name="toggle"/>
  <cc:facet name="header"/>
</cc:interface>
<cc:implementation>
  <h:panelGroup layout="block"
      styleClass="collapsiblePanel-header">
    <h:selectBooleanCheckbox id="toggle"
        onclick="#{cc.attrs.model.toggle}"
        />
    <cc:renderFacet name="header"/>
  </h:panelGroup>
  <h:panelGroup layout="block"
      rendered="#{!cc.attrs.model.collapsed}">
    <cc:insertChildren/>
  </h:panelGroup>
</cc:implementation>
</body></html>